import Vue from 'vue'

import VueRouter from 'vue-router'
import Login from '../view/login'
import Register from '../view/register'
import Article from '../view/article'
import List from '../view/list'
import NotFound from '@/view/NotFound'

Vue.use(VueRouter)

const router = new VueRouter({
  linkActiveClass: 'aa',
  linkExactActiveClass: 'bb',
  routes: [
    {
      path:'/',
      redirect:'/login'
    },
    {
      path:'/login',
      component:Login
    },
    {
      path:'/register/:username/:age',
      component:Register
    },
    {
      path:'/article',
      component:Article
    },
    {
      path:'/list',
      component:List
    },
    {
      path:'*',
      component:NotFound
    },
  ]
})

export default router
